home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-11-25 | 986 b | 31 lines | [TEXT/MPS ] |
-
- # Create a variable that evaluates to the desired format string for cdent.
-
- SET MyCPlusFormat ∂
- '-ll 512 ∂
- -decl0 "&n dl0" ∂
- -fundef4 "• &n" ∂
- -fundef8 "i+®0 s • &n" ∂
- -fundef10 "?n∂{• s#}∂{•/?n∂{s#}∂{&n c®2}}" ∂
- -fundef13 "&n c®2-®0 • n" ∂
- -fundef14 "&n c®2-®0 • n" ∂
- -if4 "&n • &n i+®0" ∂
- -if6 "&n c®2-®0 &n • &n" ∂
- -else3 "&n • &n • i+®0" ∂
- -struct3 "&n• n# i+®0" ∂
- -switch2 "&n • n# i+®0 i+®0" ∂
- -switch3 "&n c®2-®0 • &s" ∂
- -switch7 "i-®0 c®2-®0 &n • n#" ∂
- -while2 "&n • n# i+®0" ∂
- -for5 "&n • n# i+®0" ∂
- -do2 "&n • n# i+®0"'
- EXPORT MyCPlusFormat
-
-
- # Set up a menu item/command key that will format C++ code according to your conventions.
- # You can then format an entire open window or a "proper" selection (i.e. a whole function,
- # or other outer level declaration).
-
- AddMenu edit 'CDent §/=' '(CDent {MyCPlusFormat} ∂
- <"{active}.§" >"{MPW}cdentText" ≥ "{MPW}MPW.Errors" && catenate "{MPW}cdentText">"{active}.§") || alert <"{MPW}MPW.Errors"'
-